'use strict';
module.exports = {
	/**
	 * 添加分类
	 * @url admin/system/classify/sys/add 前端调用的url参数地址
	 * data 请求参数 说明
	 * @param {String} name	名称
	 * @param {Number} type	类型
	 * @param {Boolean}	trial	过审
	 * @param {Boolean}	status	状态
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------
		
		let dbName = "db-classify";
		
		res["data"] = await vk.baseDao.add({
			dbName,
			dataJson: data
		})

		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
